package com.meixiang.entity.shopping;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 支付方式
 *
 * @author LZRUI
 */
public class PayMethodEntity implements Parcelable {

    private String paymentId; // 支付id
    private String paymentName; // 支付方式名称
    private String paymentLogo; // 支付方式logo
    private String paymentMsg; // 支付提示

    public PayMethodEntity() {
    }

    public PayMethodEntity(String paymentId, String paymentName, String paymentLogo, String paymentMsg) {
        this.paymentId = paymentId;
        this.paymentName = paymentName;
        this.paymentLogo = paymentLogo;
        this.paymentMsg = paymentMsg;
    }

    public String getPaymentId() {
        return paymentId == null ? "" : paymentId;
    }

    public void setPaymentId(String paymentId) {
        this.paymentId = paymentId;
    }

    public String getPaymentName() {
        return paymentName == null ? "" : paymentName;
    }

    public void setPaymentName(String paymentName) {
        this.paymentName = paymentName;
    }

    public String getPaymentLogo() {
        return paymentLogo == null ? "" : paymentLogo;
    }

    public void setPaymentLogo(String paymentLogo) {
        this.paymentLogo = paymentLogo;
    }

    public String getPaymentMsg() {
        return paymentMsg == null ? "" : paymentMsg;
    }

    public void setPaymentMsg(String paymentMsg) {
        this.paymentMsg = paymentMsg;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.paymentId);
        dest.writeString(this.paymentName);
        dest.writeString(this.paymentLogo);
        dest.writeString(this.paymentMsg);
    }

    protected PayMethodEntity(Parcel in) {
        this.paymentId = in.readString();
        this.paymentName = in.readString();
        this.paymentLogo = in.readString();
        this.paymentMsg = in.readString();
    }

    public static final Creator<PayMethodEntity> CREATOR = new Creator<PayMethodEntity>() {
        @Override
        public PayMethodEntity createFromParcel(Parcel source) {
            return new PayMethodEntity(source);
        }

        @Override
        public PayMethodEntity[] newArray(int size) {
            return new PayMethodEntity[size];
        }
    };
}
